import { createGetRequest, createPostRequest } from '@/utils/request'
import { waitTime } from '@/utils/wait'


// 获取体检详情
const getAnnualExamInfo = async (patientNumber) => {
    await waitTime(1000)
    return await createGetRequest('/annualExam/detail', { patientNumber })
}

// 获取年度体检列表
const getAnnualExamList = async (params): Promise<any> => {
    await waitTime(1000)
    return await createGetRequest('/annualExam/list', params)
}

// 删除患者
const deleteAnnualExam = async (patientnumber) => {
    return await createPostRequest('/annualExam/delete', { patientnumber })
}


// 保存年度体检
const saveExam = async (values) => {
    await waitTime(1000)
    return await createPostRequest('/annualExam/save', values)
}

// 编辑年度体检
const editExam = async (values) => {
    await waitTime(1000)
    return await createPostRequest('/annualExam/edit', values)
}



export {
    getAnnualExamInfo,
    getAnnualExamList,
    deleteAnnualExam,
    saveExam,
    editExam
}